<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>系统管理员 - 疫苗预约系统</title>
    <link rel="stylesheet" href="../css/common.css?v=20251119">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
</head>
<body>
    <div class="main-container">
        <!-- 侧边栏 -->
        <div class="sidebar">
            <div class="sidebar-header">
                <i class="fas fa-syringe"></i>
                <h2>疫苗预约系统</h2>
                <p>系统管理员</p>
            </div>
            <nav class="sidebar-menu">
                <a href="home.html" class="menu-item active">
                    <i class="fas fa-home"></i>
                    <span>首页</span>
                </a>
                <a href="site.html" class="menu-item">
                    <i class="fas fa-hospital"></i>
                    <span>接种点管理</span>
                </a>
                <a href="staff.html" class="menu-item">
                    <i class="fas fa-user-tie"></i>
                    <span>工作人员管理</span>
                </a>
                <a href="vaccine.html" class="menu-item">
                    <i class="fas fa-vial"></i>
                    <span>疫苗管理</span>
                </a>
                <a href="statistics.html" class="menu-item">
                    <i class="fas fa-chart-line"></i>
                    <span>数据统计</span>
                </a>
            </nav>
        </div>

        <!-- 主内容区域 -->
        <div class="main-content">
            <!-- 顶部导航栏 -->
            <div class="top-navbar">
                <div class="navbar-left">
                    <h1>系统管理员</h1>
                </div>
                <div class="navbar-right">
                    <div class="user-info">
                        <div class="user-avatar" id="userAvatar">S</div>
                        <span class="user-name" id="userName">超级管理员</span>
                    </div>
                    <button class="btn-logout" onclick="handleLogout()">
                        <i class="fas fa-sign-out-alt"></i> 退出登录
                    </button>
                </div>
            </div>

            <!-- 内容区域 -->
            <div class="content-area">
                <!-- 欢迎信息 -->
                <div class="page-header">
                    <h2 class="page-title">欢迎回来，<span id="welcomeName">超级管理员</span>！</h2>
                    <p class="page-subtitle">今天是 <span id="currentDate"></span></p>
                </div>

                <!-- 系统概览统计 -->
                <div class="stats-grid">
                    <div class="stat-card">
                        <div class="stat-icon primary">
                            <i class="fas fa-users"></i>
                        </div>
                        <div class="stat-info">
                            <h3 id="totalUsers">0</h3>
                            <p>总用户数</p>
                        </div>
                    </div>

                    <div class="stat-card">
                        <div class="stat-icon success">
                            <i class="fas fa-calendar-check"></i>
                        </div>
                        <div class="stat-info">
                            <h3 id="totalAppointments">0</h3>
                            <p>总预约数</p>
                        </div>
                    </div>

                    <div class="stat-card">
                        <div class="stat-icon warning">
                            <i class="fas fa-hospital"></i>
                        </div>
                        <div class="stat-info">
                            <h3 id="totalSites">0</h3>
                            <p>接种点数</p>
                        </div>
                    </div>

                    <div class="stat-card">
                        <div class="stat-icon danger">
                            <i class="fas fa-vial"></i>
                        </div>
                        <div class="stat-info">
                            <h3 id="totalVaccines">0</h3>
                            <p>疫苗种类</p>
                        </div>
                    </div>
                </div>

                <!-- 预约状态统计 -->
                <div class="card">
                    <div class="card-header">
                        <h3 class="card-title">预约状态统计</h3>
                    </div>
                    <div class="card-body">
                        <div class="stats-grid" style="grid-template-columns: repeat(3, 1fr);">
                            <div class="stat-card">
                                <div class="stat-icon warning">
                                    <i class="fas fa-clock"></i>
                                </div>
                                <div class="stat-info">
                                    <h3 id="pendingAppointments">0</h3>
                                    <p>待接种</p>
                                </div>
                            </div>

                            <div class="stat-card">
                                <div class="stat-icon success">
                                    <i class="fas fa-check-circle"></i>
                                </div>
                                <div class="stat-info">
                                    <h3 id="completedAppointments">0</h3>
                                    <p>已完成</p>
                                </div>
                            </div>

                            <div class="stat-card">
                                <div class="stat-icon danger">
                                    <i class="fas fa-times-circle"></i>
                                </div>
                                <div class="stat-info">
                                    <h3 id="cancelledAppointments">0</h3>
                                    <p>已取消</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 快捷操作 -->
                <div class="card">
                    <div class="card-header">
                        <h3 class="card-title">快捷操作</h3>
                    </div>
                    <div class="card-body">
                        <div style="display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px;">
                            <a href="site.html" class="quick-action-card">
                                <i class="fas fa-hospital"></i>
                                <span>管理接种点</span>
                            </a>
                            <a href="staff.html" class="quick-action-card">
                                <i class="fas fa-user-tie"></i>
                                <span>管理工作人员</span>
                            </a>
                            <a href="vaccine.html" class="quick-action-card">
                                <i class="fas fa-vial"></i>
                                <span>管理疫苗</span>
                            </a>
                            <a href="statistics.html" class="quick-action-card">
                                <i class="fas fa-chart-line"></i>
                                <span>查看统计</span>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <style>
        .quick-action-card {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 30px 20px;
            background: white;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            text-decoration: none;
            color: #333;
            transition: all 0.3s ease;
        }

        .quick-action-card:hover {
            border-color: #4A90E2;
            box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
            transform: translateY(-2px);
        }

        .quick-action-card i {
            font-size: 36px;
            color: #4A90E2;
            margin-bottom: 10px;
        }

        .quick-action-card span {
            font-size: 14px;
            font-weight: 500;
        }
    </style>

    <script src="../js/common.js"></script>
    <script src="js/home.js"></script>
</body>
</html>

